﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;

namespace IRepository
{
    public interface IBaseRepository<TEntity>
    {
        public Task<List<TEntity>> Find(Expression<Func<TEntity, bool>> exp);
        public Task<List<TEntity>> FindAll();
        public Task<bool> Add(TEntity entity);
        public Task<bool> UpdateAsync(TEntity entity);
        // public Task<bool> Delete(TEntity entity);
        public Task<bool> Delete(int id);
        public Task<List<TEntity>> FindAllByCondition(Expression<Func<TEntity, bool>> searchTerm);
    }
}
